export default {
  components: {},
  data() {
    return {
      isReloding: false,
      dataList: [],
      pageData: {
        pageNum: 1,
        pageSize: 10,
      },
      isLoading: false,
      isMore: true,
      workStatus: 1,
    };
  },
  created() {
  },
  onShow() {
    this.reload();
  },
  computed: {
    statusObj() {
      const { orderTypeName } = this;
      const statusObj = {
        status1: '进行中',
        status2: `${orderTypeName || '维修'}完成`,
        status3: '已验收',
      };
      return statusObj;
    },
  },
  methods: {
    init() {
    },
    addNew() {
      uni.navigateTo({
        url: `/pages/order/add-new/addNew`,
      });
    },
    del(e) {
      console.log(e);
    },
    refresh() {
      this.isReloding = true;
      this.reload();
    },
    loadMore() {
      if (this.isLoading || !this.isMore) {
        return;
      }
      this.pageData.pageNum += 1;
      this.getData();
    },
    tabChange(data) {
      this.workStatus = data.value;
      this.reload();
    },
    reload() {
      this.dataList = [];
      this.getData();
    },
  },
};
